package com.ylyq.ylxx.service.impl;

import com.ylyq.ylxx.entity.YlyqCoverWechat;
import com.ylyq.ylxx.mapper.YlyqCoverWechatMapper;
import com.ylyq.ylxx.model.request.SaveCoverWechatRequest;
import com.ylyq.ylxx.service.IYlyqCoverWechatService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaweichao
 * @since 2020-11-09
 */
@Service
public class YlyqCoverWechatServiceImpl extends ServiceImpl<YlyqCoverWechatMapper, YlyqCoverWechat> implements IYlyqCoverWechatService {

    @Autowired
    private YlyqCoverWechatMapper ylyqCoverWechatMapper;

    /**
     * 功能描述：添加微信号
     * @author 577
     * @param saveCoverWechatRequest 添加的数据
     * @return
     * @date 2020/11/9
     **/
    @Override
    public int save(SaveCoverWechatRequest saveCoverWechatRequest){
        YlyqCoverWechat ylyqCoverWechat = new YlyqCoverWechat();
        BeanUtils.copyProperties(saveCoverWechatRequest,ylyqCoverWechat);
        return ylyqCoverWechatMapper.insert(ylyqCoverWechat);
    }
}
